<template>
	<view class="">
		<button type="default">激励视频测试</button>
	</view>
</template>

<script>
	var videoAd = null
	export default{
		data(){
			return{
				
			}
		},
		methods:{
			adLoad(){
				  if (uni.createRewardedVideoAd) {
				        videoAd = uni.createRewardedVideoAd({
				            adUnitId: "xxxxxxxxxxx" //你的广告key
				        })
				        videoAd.onError(err => {})
				        videoAd.onClose((status) => {
				        if (status && status.isEnded || status === undefined) {
							console.log('播放完成');
				            //这里写广告播放完成后的事件
				        } else {
							console.log('播放未完成');
						}
				        })
				    }
			}
		}
	}
</script>

<style scoped lang="less">
</style>
